﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Expect.Core.Errors;
using Expect.Core.Interfaces;
using Expect.Core.BaseClasses;

namespace Expect.Core
{
    using System.Diagnostics;

    /// <summary>
    /// Represent a cell of a fixture
    /// </summary>
    [DebuggerDisplay("{DisplayText}:{IsSuccessful}")]
    [Serializable]
    public class FixtureCell : RunnableElement
    {
        /// <summary>
        /// Text of the cell
        /// </summary>
        public string DisplayText { get
        {
            if (ExpectedValue != null) return ExpectedValue.ToString();

            return Text;
        }
        }

        /// <summary>
        /// Text of the cell
        /// </summary>
        public string Text { get; set; }

        /// <summary>
        /// Expected value of the cell
        /// </summary>
        public object ExpectedValue { get; set; }

        /// <summary>
        /// Actual value of the cell
        /// </summary>
        public object ActualValue { get; set; }        
    }
}
